package com.xxx.video.main.presenters;

import android.content.Context;

import androidx.annotation.NonNull;

import com.xxx.video.commen.configs.UserManager;
import com.xxx.video.commen.presenters.BasePresenter;
import com.xxx.video.commen.utils.ResponseUtils;
import com.xxx.video.main.beans.FriendMessageBean;
import com.xxx.video.network.listeners.CommonResponseListener;
import com.xxx.video.network.utils.NetWorkUtils;

public class FriendMessagePresenter extends BasePresenter<IFriendMessageView> {

    public FriendMessagePresenter(@NonNull Context context, IFriendMessageView baseView) {
        super(context, baseView);
    }

    public void friendsPrivate(int page) {
        NetWorkUtils.getInstance().friendsPrivate(String.valueOf(page), new CommonResponseListener<FriendMessageBean>() {
            @Override
            public void onSuccess(FriendMessageBean successOb, String result) {
                if (ResponseUtils.getInstance().isNoError(successOb)) {
                    if (getBaseView() != null) {
                        getBaseView().initData2View(successOb);
                    }
                }
            }

            @Override
            public void onFailure(Object failureObj) {

            }
        });
    }
}
